<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%-- 获取请求对象绑定数据 --%>
<%--<%
    List<String> pageInfo = (List<String>) request.getAttribute("pageInfo");
    for (String s : pageInfo) {
        out.println("<h1>"+s+"</h1>");
    }
%>--%>

<%--使用JSTL表达式循环遍历可迭代对象--%>
<c:forEach items="${pageInfo}" var="str" varStatus="status">
    <h3>${str}, ${str.length()}</h3>
    <h4>${status.index}</h4>
</c:forEach>


</body>
</html>
